{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Whf课程表项目\n",
      "当前时间： 2021/10/09 06:16 Saturday\n",
      "周末休息\n",
      "自由安排\n",
      "结束\n"
     ]
    }
   ],
   "source": [
    "print(\"Whf课程表项目\")\n",
    "\n",
    "# 指定当前时间并打印\n",
    "from datetime import datetime\n",
    "now =  datetime.today().day \n",
    "time = datetime.now().strftime(\"%Y/%m/%d %H:%M %A\") \n",
    "print(\"当前时间：\",time)\n",
    "\n",
    "# 运用if else判断并输出课表\n",
    "import datetime\n",
    "time = datetime.datetime.today().weekday()\n",
    "week_time = int(time+1)\n",
    "\n",
    "if   week_time ==0:\n",
    "    print(\"有课\");\n",
    "    print(\"8：00-10:35 新媒体分析\");\n",
    "    print(\"14:30-17:30 商务沟通\");\n",
    "elif week_time ==1:\n",
    "    print(\"没课\");\n",
    "    print(\"10:35-12:00 大学英语（三）\");\n",
    "    print(\"14:30-17:30 公司财务分析与资本运作\");\n",
    "    print(\"18:45-21:00 马克思主义基本原理\");\n",
    "elif week_time ==2:\n",
    "    print(\"有课\");\n",
    "    print(\"8:00-9:30 网络文案与创意写作\");\n",
    "    print(\"9:45-12:00 影视视听语言\");\n",
    "elif week_time ==3:\n",
    "    print(\"有课\");\n",
    "    print(\"9:45-12:00 Python语言\");\n",
    "    print(\"16:10-17:30 大学英语（三）\");\n",
    "elif week_time ==4:\n",
    "    print(\"有课\");\n",
    "    print(\"10:35-12:00 广告摄影\");\n",
    "\n",
    "else:\n",
    "    print(\"周末休息\")\n",
    "    print(\"自由安排\")\n",
    "print(\"结束\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
